<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>AUI快速完成布局</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
</head>

<body>

  <body>

      <div id="list">

      </div>
      <div style="text-align:center;margin:0.625rem;display:none;background:#fff;padding:1.25rem;" id="default-1">
          <img src="./img/muyou.png" style="display:inline;">
          <p><span style="font-size:1.25rem;">亲,</span>&nbsp;&nbsp;&nbsp;&nbsp;您当前木有对应的试用品</p>
      </div>

  </body>
  <script type="text/template" id="cash1">
      {{~it:value:index}}
      <div class="aui-row" style="background:green;height:8rem;margin-bottom:0.4rem">
          <div class="aui-col-xs-7" style="border-right:2px dashed rgba(255,255,255,0.6);height:100%;text-align:center;">
            <div class="face-amount" style="line-height:2rem;margin-top:2rem;color:#fff"><span style="font-size:1rem;">￥&nbsp;</span><span style="font-size:1.6rem;">{{= value.couponMoney}}</span><span style="font-size:1rem;">&nbsp;增值券</span></div>
            <div class="face-amount" style="font-size:0.8rem;line-height:1.6rem;color:#fff"> {{= value.couponName}}id:{{= value.id }}</div>
          </div>
          <div class="aui-col-xs-5" style="height:100%;text-align:center;">
            <div style="font-size:1rem;line-height:1.6rem;margin-top:1rem;color:#fff">已提现</div>
            <p style="font-size:0.8rem;line-height:1rem;color:#fff">{{= userDate(value.start_time,2)}}</p>
                  <p style="font-size:0.8rem;line-height:1rem;color:#fff;margin-bottom:0.6rem;">{{= userDate(value.end_time,2)}}</p>
                  <div class="aui-btn">已提现</div>

          </div>
      </div>

      {{~}}

  </script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript">
    apiready = function() {
          fnGetDataCommon("CashVoucher1","index.php?m=api&c=appnew&a=coupon","post",{state:4});
          //initRefreshCommon('fnGetDataCommon("MyHome","index.php?m=api&c=appnew&a=get_userinfo","get")');

    };
function CashVoucher1Res(ret){
  var list = $api.byId('list'); //获取节点
  //var str={"array":["banana","apple","orange"]};
  // 1. 编译模板函数
  var tempFn = doT.template($api.byId('cash1').innerHTML); //找到模板多次使用
  // 2. 多次使用模板函数
  var resultText = tempFn(ret.data);
  $api.html(list, "");
  $api.append(list, resultText);
}
function CashVoucher1Res1(ret){
    $("#default-1").show();
}



</script>

</html>
